package com.wandian.controller
{
	import com.wandian.core.BitmapManager;
	import com.wandian.data.GameData;
	import com.wandian.view.mediator.LobbyMediator;
	
	import flash.display.MovieClip;
	
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;

	/**
	 * 游戏大厅命令
	 * @author long
	 */
	public class LobbyCommand extends SimpleCommand
	{
		public function LobbyCommand()
		{
			super();
		}

		public override function execute(notification:INotification):void
		{
			var texas:Texas=notification.getBody() as Texas;
			switch (notification.getName())
			{
				case CLZNoticeName.LOBBYCOMMAND_ENTER_LOBBY:
				{
					var lobby:MovieClip=GameData.getMovieClip("TableMain");//BitmapManager.instance.getMCByName("TableMain");
					texas._mcTableView.addChild(lobby);
					this.facade.registerMediator(new LobbyMediator(lobby));
					break;
				}

				default:
				{
					break;
				}
			}

		}
	}
}
